import type { PlusColumn } from 'plus-pro-components'

export function useForm() {
    const schema: PlusColumn[] = [
        {
            colProps: {
                span: 6,
            },
            label: '分组名',
            prop: 'group_name',
            valueType: 'copy',
        },
        {
            colProps: {
                span: 6,
            },
            label: '关键字',
            prop: 'keyword',
            valueType: 'copy',
        },
        {
            colProps: {
                span: 6,
            },
            label: '模块',
            prop: 'module_name',
            valueType: 'copy',
        },
        // {
        //     colProps: {
        //         span: 6,
        //     },
        //     label: '顺序',
        //     options: async () => [
        //         {
        //             label: '升序',
        //             value: 'asc',
        //         },
        //         {
        //             label: '降序',
        //             value: 'desc',
        //         },
        //     ],
        //     prop: 'order',
        //     valueType: 'select',
        // },
    ] as const

    const form = ref({
        group_name: '',
        keyword: '',
        module_name: '',
    })
    return { form, schema }
}
